package com.company.management.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import com.company.management.service.PostService;
import com.company.management.utils.JsonData;
import com.company.management.utils.ResultCode;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "职位模块",value = "职位 PostController")
@RestController
@RequestMapping("api/post")
@Slf4j
public class PostController {
    @Resource
    private PostService postService;
    @ApiOperation("获取所有职位")
    @PostMapping("/listAll")
    public JsonData listAll(){
        return JsonData.buildWithData(ResultCode.SUCCESS,postService.listAll());
    }
}
